package com.naiterui.ehp.bp.constants;

/**
 * 对外请求接口APPID
 * @author guoyongxiang
 * @date 2018/11/21 17:37
 * @since 1.0.0
 */
public enum OpenApiAppEnum {

    DOCTOR(1, "医生服务"),
    ;
    private Integer appId;
    private String name;

    /**
     * 根据appId查找配置
     * @param appId
     * @return
     */
    public static OpenApiAppEnum getApiEnum(Integer appId){
        for(OpenApiAppEnum api : OpenApiAppEnum.values()){
            if(api.getAppId().equals(appId)){
                return api;
            }
        }
        return null;
    }

    OpenApiAppEnum(Integer appId, String name) {
        this.appId = appId;
        this.name = name;
    }

    public Integer getAppId() {
        return appId;
    }

    public void setAppId(Integer appId) {
        this.appId = appId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
